#!/usr/bin/env python
"""mapper.py"""

import sys
import re

# input comes from STDIN (standard input)
distinct_pay = []
for line in sys.stdin:
    # remove leading and trailing whitespace
    line = line.strip()
    pay_type = re.search('&pay_type=(.*?)&',line)[1]
    if pay_type not in distinct_pay:
        distinct_pay.append(pay_type)
        print('%s\t%s' % (pay_type, 1))
